#include <iostream>

using namespace std;

int findUniqueNumberTest()
{
	int testData[] = {4, 5, 5, 8, 4, 6, 3, 3, 6};

	int result = 0;

	int size;

	size = sizeof(testData) / sizeof(int);

	result = testData[0];
	for (int i = 1; i < size; i++){
		result ^= testData[i];
	}

	cout <<result <<endl;
	cin.get();
	return 0;
}

/*
It only works if only one number is non-duplicated (or occurs any odd number of times) and all the other numbers occur an even number of times.

When you xor a number to another number twice (or any other even number of times) it cancels itself out leaving the original number.

*/